/**
 * 敌人飞机管理类
 */
var BaseNode = require('./../../../FrameWork/Component/BaseNode');
var UtilGameObject = require('./../../../FrameWork/Utils/UtilGameObject');
cc.Class(
{
    extends: BaseNode,

    properties:
    {
        nodeParentScorePanel:
        {
            default: null,
            type: cc.Node,
            displayName: '送分机父节点'
        },
        prefabScorePlane:
        {
            default: null,
            type: cc.Prefab,
            displayName: '送分机预设'
        }
    },
    onLoad()
    {

        var cycleTime = 300;
        var idx = 1;
        var actArray = [
            cc.delayTime(cycleTime * 0.001),
            cc.callFunc(function()
            {
                var ctr = UtilGameObject.getCtrByPrefabs(this.prefabScorePlane, this.nodeParentScorePanel, "ScorePlane");
                idx++;
                ctr.setTag(idx);
            }.bind(this))
        ];
        var seq = cc.sequence(actArray);
        this.node.runAction(cc.repeatForever(seq));

    },
});